/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;

/**
 * @author khang
 */
public class GameDesign {
    
//<editor-fold defaultstate="collapsed" desc=" Generated Fields ">//GEN-BEGIN:|fields|0|
    private Image Reimu;
    private Image topview_tiles;
    private Image menuBG;
    private Image Kanako;
    private TiledLayer menu;
    private TiledLayer background;
    private Sprite Player;
    public int Playerseq001Delay = 200;
    public int[] Playerseq001 = {0, 1, 2, 3, 2, 1};
    private Image eff01;
    private Sprite MyBoss;
    public int MyBossseq002Delay = 200;
    public int[] MyBossseq002 = {0, 1, 2, 3, 3, 2, 1};
    private Image stg5enm2E;
//</editor-fold>//GEN-END:|fields|0|
    
//<editor-fold defaultstate="collapsed" desc=" Generated Methods ">//GEN-BEGIN:|methods|0|
//</editor-fold>//GEN-END:|methods|0|

    public Image getTopview_tiles() throws java.io.IOException {//GEN-BEGIN:|1-getter|0|1-preInit
        if (topview_tiles == null) {//GEN-END:|1-getter|0|1-preInit
            // write pre-init user code here
            topview_tiles = Image.createImage("/topview_tiles.png");//GEN-BEGIN:|1-getter|1|1-postInit
        }//GEN-END:|1-getter|1|1-postInit
        // write post-init user code here
        return this.topview_tiles;//GEN-BEGIN:|1-getter|2|
    }//GEN-END:|1-getter|2|





 




    public Image getKanako() throws java.io.IOException {//GEN-BEGIN:|231-getter|0|231-preInit
        if (Kanako == null) {//GEN-END:|231-getter|0|231-preInit
            // write pre-init user code here
            Kanako = Image.createImage("/Kanako.png");//GEN-BEGIN:|231-getter|1|231-postInit
        }//GEN-END:|231-getter|1|231-postInit
        // write post-init user code here
        return this.Kanako;//GEN-BEGIN:|231-getter|2|
    }//GEN-END:|231-getter|2|



    public Image getReimu() throws java.io.IOException {//GEN-BEGIN:|275-getter|0|275-preInit
        if (Reimu == null) {//GEN-END:|275-getter|0|275-preInit
            // write pre-init user code here
            Reimu = Image.createImage("/Reimu.png");//GEN-BEGIN:|275-getter|1|275-postInit
        }//GEN-END:|275-getter|1|275-postInit
        // write post-init user code here
        return this.Reimu;//GEN-BEGIN:|275-getter|2|
    }//GEN-END:|275-getter|2|



    public Sprite getPlayer() throws java.io.IOException {//GEN-BEGIN:|289-getter|0|289-preInit
        if (Player == null) {//GEN-END:|289-getter|0|289-preInit
            // write pre-init user code here
            Player = new Sprite(getReimu(), 40, 40);//GEN-BEGIN:|289-getter|1|289-postInit
            //Player.setFrameSequence(Playerseq001);//GEN-END:|289-getter|1|289-postInit
            // write post-init user code here
            Player.defineReferencePixel(Player.getWidth()/2, Player.getHeight()/2);
        }//GEN-BEGIN:|289-getter|2|
        return Player;
    }//GEN-END:|289-getter|2|

    public Image getEff01() throws java.io.IOException {//GEN-BEGIN:|325-getter|0|325-preInit
        if (eff01 == null) {//GEN-END:|325-getter|0|325-preInit
            // write pre-init user code here
            eff01 = Image.createImage("/eff01.png");//GEN-BEGIN:|325-getter|1|325-postInit
        }//GEN-END:|325-getter|1|325-postInit
        // write post-init user code here
        return this.eff01;//GEN-BEGIN:|325-getter|2|
    }//GEN-END:|325-getter|2|

    public TiledLayer getBackground() throws java.io.IOException {//GEN-BEGIN:|326-getter|0|326-preInit
        if (background == null) {//GEN-END:|326-getter|0|326-preInit
            // write pre-init user code here
            background = new TiledLayer(1, 35, getEff01(), 256, 256);//GEN-BEGIN:|326-getter|1|326-midInit
            int[][] tiles = {
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1},
                {1}
            };//GEN-END:|326-getter|1|326-midInit
            // write mid-init user code here
            for (int row = 0; row < 35; row++) {//GEN-BEGIN:|326-getter|2|326-postInit
                for (int col = 0; col < 1; col++) {
                    background.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|326-getter|2|326-postInit
        // write post-init user code here
        return background;//GEN-BEGIN:|326-getter|3|
    }//GEN-END:|326-getter|3|

    public void updateLayerManagerForMenu_scene(LayerManager lm) throws java.io.IOException {//GEN-LINE:|363-updateLayerManager|0|363-preUpdate
        // write pre-update user code here
        getMenu().setPosition(0, 0);//GEN-BEGIN:|363-updateLayerManager|1|363-postUpdate
        getMenu().setVisible(true);
        lm.append(getMenu());//GEN-END:|363-updateLayerManager|1|363-postUpdate
        // write post-update user code here
    }//GEN-LINE:|363-updateLayerManager|2|

    public Image getMenuBG() throws java.io.IOException {//GEN-BEGIN:|368-getter|0|368-preInit
        if (menuBG == null) {//GEN-END:|368-getter|0|368-preInit
            // write pre-init user code here
            menuBG = Image.createImage("/menuBG.png");//GEN-BEGIN:|368-getter|1|368-postInit
        }//GEN-END:|368-getter|1|368-postInit
        // write post-init user code here
        return this.menuBG;//GEN-BEGIN:|368-getter|2|
    }//GEN-END:|368-getter|2|





    public TiledLayer getMenu() throws java.io.IOException {//GEN-BEGIN:|379-getter|0|379-preInit
        if (menu == null) {//GEN-END:|379-getter|0|379-preInit
            // write pre-init user code here
            menu = new TiledLayer(1, 1, getMenuBG(), 240,400);//250, 356);//GEN-BEGIN:|379-getter|1|379-midInit
            int[][] tiles = {
                {1}
            };//GEN-END:|379-getter|1|379-midInit
            // write mid-init user code here
            for (int row = 0; row < 1; row++) {//GEN-BEGIN:|379-getter|2|379-postInit
                for (int col = 0; col < 1; col++) {
                    menu.setCell(col, row, tiles[row][col]);
                }
            }
        }//GEN-END:|379-getter|2|379-postInit
        // write post-init user code here
        return menu;//GEN-BEGIN:|379-getter|3|
    }//GEN-END:|379-getter|3|

    public Image getStg5enm2E() throws java.io.IOException {//GEN-BEGIN:|386-getter|0|386-preInit
        if (stg5enm2E == null) {//GEN-END:|386-getter|0|386-preInit
            // write pre-init user code here
            stg5enm2E = Image.createImage("/stg5enm2E.png");//GEN-BEGIN:|386-getter|1|386-postInit
        }//GEN-END:|386-getter|1|386-postInit
        // write post-init user code here
        return this.stg5enm2E;//GEN-BEGIN:|386-getter|2|
    }//GEN-END:|386-getter|2|

    public Sprite getMyBoss() throws java.io.IOException {//GEN-BEGIN:|387-getter|0|387-preInit
        if (MyBoss == null) {//GEN-END:|387-getter|0|387-preInit
            // write pre-init user code here
            MyBoss = new Sprite(getStg5enm2E(), 23, 49);//GEN-BEGIN:|387-getter|1|387-postInit
            //MyBoss.setFrameSequence(MyBossseq002);//GEN-END:|387-getter|1|387-postInit
            // write post-init user code here
            MyBoss.defineReferencePixel(MyBoss.getWidth()/2, MyBoss.getHeight()/2);
        }//GEN-BEGIN:|387-getter|2|
        return MyBoss;
    }//GEN-END:|387-getter|2|





    
}
